1. Field of the Invention
The present invention relates to a code reading apparatus for converting a bar code arranged in a printed pattern on a medium into an electric signal by decoding the bar code, with the use of a photoelectric converter, into data processable by an information processing apparatus and outputting the data to such an apparatus, and more particularly, to a code reading apparatus free from reading errors caused by variations in the reference level for determination in decoding characters, which constitutes the bar code and represents plural pieces of information, due to intercharacter space (hereinafter, to be briefly called "character space") existing between characters, and therefore having a high degree of freedom for the size of the character space.
2. Description of the Prior Art
Bar code input systems are known as means for inputting data into information processing apparatus such as computers. Recently, the bar code input system have come to be widely used for sales control principally dealing with such data as kinds of goods and prices, for program reserving in a VTR, and for data inputting in checking performance of and operating and controlling industrial equipment and consumers appliances.
As to standards of such bar codes, detailed descriptions are given in Japanese Industrial Standards (JIS) B9550-1978, or a paper entitled "Construction of Bar Code System", Sensor Interfacing, No. 4, an extra issue of Transistor Technology, CQ Publishing Company, July 1, 1984, pp. 179 to 199.
FIG. 6 shows an NW-7 code pattern as an example of symbols of the bar code and explains the structure of the code; FIG. 6(a) is a drawing showing a full symbol which represents five characters C1 to C5 and FIG. 6(b) is an enlarged partial view of the same.
The code pattern shown in FIG. 6(a) is constituted of start/stop codes S/S and five succeeding character codes C1 to C5 and, as shown in FIG. 6(b), it has character spaces CS between the characters and between the start/stop codes and the characters (the character CN in FIG. 6(b) represents "0000110"). The code indicated in FIG. 6(a) is such as is adapted to be read both in the direction indicated by the arrow and in the opposite direction.
The reading of the codes is performed in such a way that two levels of "H" and "L" corresponding to black bars and white spaces in the code configuration are obtained by means of a photoelectric converter, the distance between one edge (transition point) between the black bar and white space and the next edge is converted into a count value according to a clock signal, narrow bars and narrow spaces, referenced to the count value obtained by reading the start/stop code S/S, are acknowledged, for example, as binary "0 bits", and wide bars and wide spaces as binary "1 bits", a character represented by the thus determined number of bits is decoded therefrom, and it is transferred to an information processing apparatus such as a computer.
FIG. 7 is a schematic block diagram showing a configuration of a code reading apparatus for reading such a bar code as described above, in which reference numeral 101 denotes a photoelectric converter portion, 104 denotes a counter portion, 107 denotes a decoder portion, and 110 denotes a start/stop determining portion.
In FIG. 7, the photoelectric converter portion 101 is for scanning a bar code and converting it into a two-level signal of "H" and "L" and the counter portion 104 is for counting the duration of the "H" and "L" level incoming from the photoelectric converter portion 101 according to a clock signal CL and outputting the counts. The start/stop determining portion 110 is for acknowledging the start/stop code S/S of an indicated code and controlling operations of the counter portion 104 and the decoder portion 107. The decoder portion 107 is for decoding the character code in binary data and transferring the data to an information processing apparatus.
Details of the code reading apparatus of the described type are disclosed, for example, in Japanese Patent Application No. 63-30030 and Utility Model Application No. 63-16999, both applied by the present applicant.
In the above described bar code, there are present spaces between codes (character spaces). If the character space is set to a size larger than the bar with the largest width, such a thing tends to occur that the character space is mistaken as a stop margin thereby making the decoding impossible or, since whether each bar or space constituting a code is narrow or wide is made by reference to the threshold value obtained as the count value of the preceding bar or space, a wrong determination is made as to whether the bar or space following the character space is narrow or wide. On the other hand, since the character space is for dividing up the codes, the degree of freedom for the size of the character space provided on a medium is desired to be as large as possible.